/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package controller.controller;

import Model.DAO;
import android.app.ListActivity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.ArrayAdapter;
import android.widget.TextView;
import java.util.List;

/**
 *
 * @author sio
 */
public class MedActivity extends ListActivity{
    public void onCreate(Bundle icicle){
        super.onCreate (icicle);
        setContentView(R.layout.med);
        //TextView label =(TextView)findViewById(R.id.label);
        Intent inter =getIntent();
        String nom = inter.getStringExtra("leNom");
        List<String> lesMeds = DAO.getLesMeds(nom);
        ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, lesMeds);
        setListAdapter(adapter);
//        
        //label.setText(nom);
    }
}
